//
//  FeedDetailViewController.h
//  NewsReader
//
//  Created by blacksun on 10-11-10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ImageDownloader.h"
#import "WeiboOAuthController.h"
#import "SendTweetController.h"

@class Feed;
@class Content;

#define kContentTypeText	@"text"
#define kContentTypeImage	@"image"
#define kFontSize	15.0
#define kDefaultTitleFontSize 17.0
#define kTitleFontSize		20.0

#define kDetailCell_Image	900
#define kDetailCell_Label	901


@interface FeedDetailViewController : UIViewController<ImageDownloaderDelegate, UIActionSheetDelegate> {
	UIView *container;
	UILabel *titleLabel;
	UILabel *pubDateLabel;
	UILabel *authorLable;
	UIScrollView *scrollView;
	Feed *feed;
	NSMutableDictionary *inPressImageDownloaders;
	BOOL displayed;
	UIActivityIndicatorView *loadingView;
	UIView *announceView;
	UITableView *aTableView;
	BOOL networkState;
	SendTweetController *sendTweetController;
}
@property (nonatomic, retain) IBOutlet UITableView *aTableView;
@property (nonatomic, retain) IBOutlet UIView *announceView;
@property (nonatomic, retain) IBOutlet UIView *container;
@property (nonatomic, retain) IBOutlet UILabel *titleLabel;
@property (nonatomic, retain) IBOutlet UILabel *pubDateLabel;
@property (nonatomic, retain) IBOutlet UILabel *authorLable;
@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *loadingView;
@property (nonatomic, retain) Feed *feed;
@property (nonatomic, retain) NSMutableDictionary *inPressImageDownloaders;
@property (nonatomic, retain) SendTweetController *sendTweetController;

-(void)startIconDownload:(NSString *)aImageUrl identify:(NSIndexPath *)identify;
-(IBAction) popController;
-(void)removeDetail;
-(void)reset:(Feed *)aFeed;
-(void)displayDetail;
-(IBAction) gotoSafari:(id)sender;
-(IBAction) share;
-(void) stopAllImageDownloading;

-(void) addSendTweetView:(BaseWeibo *)aWeibo;

@end
